<template>
  <div class="header">
    <div class="header_top">
      <div class="header_top_left">
        <span :class="isCollapse?'el-icon-s-unfold':'el-icon-s-fold'" class="fold" @click="COLLAPSE"></span>
        <FullScreen/>
      </div>
      <div class="header_top_right">
        <!-- <el-input
          placeholder="请输入您要搜索的内容"
          v-model="content"
          size="small"
          class="input-with-select"
          clearable>
          <div slot="append" class="el-icon-search" @click="search"></div>
        </el-input> -->
        <User/>
      </div>
    </div>
    <div class="header_bottom">
      <Tags/>
    </div>
  </div>
</template>

<script>
  import {mapState, mapMutations} from 'vuex';
  import Tags from './Tags';
  import User from './User';
  import FullScreen from './FullScreen';

  export default {
    name: "Header",
    data() {
      return {
        content: "",//搜索内容
      }
    },
    computed: {
      ...mapState(['isCollapse']),//获取激活菜单路由和菜单是否展开
    },
    methods: {
      ...mapMutations(['COLLAPSE']),
      search() {
        // alert(1)
      },
    },
    components: {
      Tags, User, FullScreen
    },
  }
</script>

<style scoped>
  .input-with-select >>> .el-input__inner:hover, .input-with-select >>> .el-input__inner:focus {
    border-color: #DCDFE6 !important;
  }

  .input-with-select {
    width: 250px;
    margin-right: 15px;
  }

  .input-with-select >>> .el-input__inner {
    border-right: none;
  }

  .input-with-select >>> .el-input-group__append {
    background-color: transparent;
    padding: 0 5px;
    cursor: pointer;
    border-left: none;
  }

  .el-icon-search {
    height: 100%;
    font-size: 18px;
    padding: 0 5px;
    line-height: 100%;
  }

  .fold {
    font-size: 24px;
    cursor: pointer;
    margin-right: 12px;
    color: #3E3F42;
  }

  .header {
    background: rgba(255, 255, 255, 1);
  }

  .header_top {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    padding: 0 22px;
  }

  .header_bottom {
    height: 50px;
    display: flex;
    align-items: center;
    padding-left: 20px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  }

  .header_top_left, .header_top_right {
    display: flex;
    align-items: center;
  }
</style>
